<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <title>Create Links and Footnotes</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link href="../../stylesheet.css" type="text/css" rel="stylesheet"/>
<link href="../../page_styles1.css" type="text/css" rel="stylesheet"/>

  


<link href="../../calibreHtmlOutBasicCss.css" type="text/css" rel="stylesheet" />

</head>
<body>

<div class="calibreMeta">
  <div class="calibreMetaTitle">
  
  
    
    <h1>
      <a href="../../../index.html">Sigil User Guide
</a>
    </h1>
    
    
  
  </div>
  <div class="calibreMetaAuthor">
    0.7.2

  </div>
</div>

<div class="calibreMain">

  <div class="calibreEbookContent">
    
      <div class="calibreEbNavTop">
        
          <a href="tutorial_generate_toc.html" class="calibreAPrev">previous page</a>
        

        
          <a href="tutorial_code_view.html" class="calibreANext"> next page</a>
        
      </div>
    

    
  <h2 id="links" class="calibre5">Create Links and Notes</h2>

  <p class="h2subheading">— Linking your Text —</p>

  <p class="calibre1">Sigil allows you to easily link text to other parts of your book, such as chapter names and notes, so that readers can select the link and jump to the identified text.</p>

  <h3 class="sigilnotintoc">IDs</h3>

  <p class="calibre1">In order for Sigil to create a link from certain words in your book to other locations in your book, you first need to give a name or ID to the text you want your link to go to.</p>

  <p class="calibre1">If the target for your link is just the top of a file, then you don’t need to do anything since you can use the filename as the target ID.</p>

  <p class="calibre1">But if you want to point to specific words in your book, then you need to assign a name or ID to the text.</p>

  <div class="tip">
    <p class="tiptext">An ID is just a unique name, like <span class="example2">note1</span> that you will assign to a some of your text so that you can refer to it. ID names must be unique within an HTML file (and start with a letter), but its best if they are unique throughout the whole EPUB in case you move text around.</p>

    <p class="tiptext">IDs and links are usually created with the HTML anchor tag ("a") – so the ID is often considered the anchor ID for a link, hence the button used for inserting IDs.</p>
  </div>

  <h4 class="sigilnotintoc1">Create an ID</h4>

  <p class="calibre1">To create an ID, select some text in your book and click on the Insert ID button <img alt="insert-id_22px" src="../Images/insert-id_22px.png" class="calibre7"/>:</p>

  <div class="image"><img alt="tutorial-link-insert-id" src="../Images/tutorial-link-insert-id.png" class="calibre7"/></div>

  <p class="calibre1">This will open the Insert ID dialog where you can type the name of your ID:</p>

  <div class="image"><img alt="tutorial-link-insert-id-dialog" src="../Images/tutorial-link-insert-id-dialog.png" class="calibre7"/></div>

  <p class="calibre1">You won’t see any change to your text in Book View, but if you click on your text and click on the Insert ID button again you will see the ID listed.</p>

  <div class="tip">
    <p class="tiptext">In order to remove an anchor tag and its ID in Book View you will need to select all the text and delete it and retype it. Or use Code View.</p>
  </div>

  <h3 class="sigilnotintoc">Links</h3>

  <p class="calibre1">A link is a way to point to your ID, and when selected by the reader it "jumps" the reader to the location of the ID.</p>

  <p class="calibre1">To create a link in Sigil, select some text to use for the link and click on the Insert Link button <img alt="insert-hyperlink_22px" src="../Images/insert-hyperlink_22px.png" class="calibre7"/>:</p>

  <div class="image"><img alt="tutorial-links-insert-link" src="../Images/tutorial-links-insert-link.png" class="calibre7"/></div>

  <p class="calibre1">This will open the Select Target dialog which shows you the IDs in your book that you can link to:</p>

  <div class="image"><img alt="tutorial-links-insert-link-dialog" src="../Images/tutorial-links-insert-link-dialog.png" class="calibre7"/></div>

  <p class="calibre1">You will notice a number of different IDs in the list. At first it might not look like yours is there, so to find it, it helps to understand what a link looks like:</p>

  <ul class="calibre3">
    <li class="calibre4"><span class="listheading">Filename.html:</span> This points to just a filename as the target of your link and tells the link to jump to the top of the file. This is what is used for the Generate Table Of Contents links.</li>

    <li class="calibre4"><span class="listheading">Filename.html#ID1:</span> This points to a specific ID in a file. When you use this as the target of your link the reader will go to the exact location of the text with the ID in the file listed.</li>

    <li class="calibre4"><span class="listheading">#ID1:</span> This is just the ID name, and implies that it is in the same file as your link so no filename is needed.</li>
  </ul>

  <p class="calibre1">When you select a link you will see that the Target text box shows the actual link that will be used. Click <span class="buttonbox">OK</span>, or double-click on an entry, and the link will be created for your text.</p>

  <p class="calibre1">If you click on the newly created link in your text you will jump to where the ID is. You can then click the Back button <img alt="back-to-link-style_22px" src="../Images/back-to-link-style_22px.png" class="calibre7"/> to return to where you clicked the link.</p>

  <h4 class="sigilnotintoc1">Reverse Linking</h4>

  <p class="calibre1">Most ereaders have a Back button that you can select once you follow a link to take you back to the original linked text. But for those that don’t, you can create a link from your destination back to your original source text. This is often called reverse linking.</p>

  <p class="calibre1">Reverse linking is just like any other kind of linking – it just means you have to create a link from the source text to your destination note, and also from your destination note back to your source text – so both source and destination will need IDs and links, and will be mirror versions of each other:</p>

  <div class="image"><img alt="note" src="../Images/note.png" class="calibre7"/></div>

  <p class="calibre1">For example, in the typical case of creating endnotes:</p>

  <ul class="calibre3">
    <li class="calibre4">Select your note at the end of your book (or chapter) and assign an ID to it, e.g. <span class="example">note1</span>.</li>

    <li class="calibre4">Select your text in the book and assign an ID for it, e.g. <span class="example">text1</span>.</li>

    <li class="calibre4">Select the same text again and create a link to the note’s ID.</li>

    <li class="calibre4">Select your note again (click on the link to jump you to the note and to test the link), and create a link pointing back to your text’s ID.</li>

    <li class="calibre4">Click on the note to jump you back to your text to test the link.</li>
  </ul>



  </div>

  
  <div class="calibreToc">
    <h2><a href="../../../index.html"> Table of contents</a></h2>
     <div>
  <ul>
    <li>
      <a href="cover_picture.html">Cover</a>
    </li>
    <li>
      <a href="titlepage.html">Title Page</a>
    </li>
    <li>
      <a href="rights.html">Copyright</a>
    </li>
    <li>
      <a href="introduction.html">Introduction</a>
      <ul>
        <li>
          <a href="whats_new.html">What’s New</a>
        </li>
        <li>
          <a href="about_sigil.html">About Sigil</a>
        </li>
        <li>
          <a href="about_epub.html">About EPUB</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="installation.html">Installation</a>
    </li>
    <li>
      <a href="features.html">Features</a>
      <ul>
        <li>
          <a href="user_interface.html">User Interface</a>
        </li>
        <li>
          <a href="preferences.html">Preferences</a>
        </li>
        <li>
          <a href="opening_and_saving_files.html">Opening and Saving Files</a>
        </li>
        <li>
          <a href="book_view.html">Book View</a>
        </li>
        <li>
          <a href="code_view.html">Code View</a>
        </li>
        <li>
          <a href="preview.html">Preview</a>
        </li>
        <li>
          <a href="book_browser.html">Book Browser</a>
        </li>
        <li>
          <a href="metadata.html">Metadata</a>
        </li>
        <li>
          <a href="add_cover.html">Add Cover</a>
        </li>
        <li>
          <a href="table_of_contents.html">Table of Contents</a>
        </li>
        <li>
          <a href="validation.html">Validation</a>
        </li>
        <li>
          <a href="spellcheck.html">Spellcheck</a>
        </li>
        <li>
          <a href="media_files.html">Images, Video, Audio</a>
        </li>
        <li>
          <a href="special_characters.html">Special Characters</a>
        </li>
        <li>
          <a href="splitting_and_merging.html">Splitting and Merging</a>
        </li>
        <li>
          <a href="find_replace.html">Find &amp; Replace</a>
        </li>
        <li>
          <a href="saved_searches.html">Saved Searches</a>
        </li>
        <li>
          <a href="clips.html">Clips</a>
        </li>
        <li>
          <a href="clipboard_history.html">Clipboard History</a>
        </li>
        <li>
          <a href="links.html">Links and IDs</a>
        </li>
        <li>
          <a href="styles.html">Styles</a>
        </li>
        <li>
          <a href="indexes.html">Indexes</a>
        </li>
        <li>
          <a href="reports.html">Reports</a>
        </li>
        <li>
          <a href="external_editors.html">External Editors</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="tutorials.html">Tutorials</a>
      <ul>
        <li>
          <a href="tutorial_getting_started_with_epub.html">Getting Started With EPUB</a>
        </li>
        <li>
          <a href="tutorial_convert_to_html.html">Prepare Your File For Sigil</a>
        </li>
        <li>
          <a href="tutorial_load_file.html">Open Your File With Sigil</a>
        </li>
        <li>
          <a href="tutorial_save.html">Save Your EPUB File</a>
        </li>
        <li>
          <a href="tutorial_metadata.html">Add the Author and Title</a>
        </li>
        <li>
          <a href="tutorial_add_cover.html">Add a Cover Image</a>
        </li>
        <li>
          <a href="tutorial_split.html">Create Files For Each Chapter</a>
        </li>
        <li>
          <a href="tutorial_mark_chapters.html">Identify Your Chapters</a>
        </li>
        <li>
          <a href="tutorial_generate_toc.html">Generate A Table of Contents</a>
        </li>
        <li>
          <a href="tutorial_links.html">Create Links and Notes</a>
        </li>
        <li>
          <a href="tutorial_code_view.html">A Quick Introduction To Code View</a>
        </li>
        <li>
          <a href="tutorial_spelling.html">Check For Spelling Mistakes</a>
        </li>
        <li>
          <a href="tutorial_validate.html">Check For Errors In Your EPUB</a>
        </li>
        <li>
          <a href="tutorial_find_replace.html">Edit With Find &amp; Replace</a>
        </li>
        <li>
          <a href="tutorial_stylesheets.html">Use Stylesheets</a>
        </li>
        <li>
          <a href="tutorial_embed_fonts.html">Include Custom Fonts</a>
        </li>
        <li>
          <a href="tutorial_advanced_find.html">Advanced Find &amp; Replace – Regex</a>
        </li>
        <li>
          <a href="tutorial_regex_reference.html">Regular Expression Reference</a>
        </li>
        <li>
          <a href="tutorial_tips.html">Tips</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="faq.html">FAQ</a>
      <ul>
        <li>
          <a href="faq.html#faq_common_questions">Common Questions</a>
        </li>
        <li>
          <a href="faq.html#faq_questions">Where to Get Help</a>
        </li>
        <li>
          <a href="faq.html#faq_using_sigil">Using Sigil</a>
        </li>
        <li>
          <a href="faq.html#faq_formatting">Formatting and Styles</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="contributing_to_sigil.html">Contributing to Sigil</a>
    </li>
  </ul>
</div>


  </div>
  

  <div class="calibreEbNav">
    
      <a href="tutorial_generate_toc.html" class="calibreAPrev">previous page</a>
    

    <a href="../../../index.html" class="calibreAHome"> start</a>

    
      <a href="tutorial_code_view.html" class="calibreANext"> next page</a>
    
  </div>

</div>

</body>
</html>
